<?php include PATH_TPL."/tpl_header.html" ?>
<script type="text/javascript" src="/public/js/admin/addStudent.js"></script>

<div class="header">
    <h1 class="page-title">学生管理</h1>
</div>
        
<ul class="breadcrumb">
    <li><a>学生管理</a> <span class="divider">/</span></li>
    <li><a href="<?php echo SITE_ROOT;?>admin/show-students">学生信息</a> <span class="divider">/</span></li>
    <li class="active">添加学生</li>
</ul>

<div class="container-fluid">
    <div class="row-fluid">
        <div class="well">
          <ul class="nav nav-tabs">
            <li class="active"><a href="#home" data-toggle="tab">基本信息</a></li>
          </ul>
          <div id="myTabContent" class="tab-content">
            <div class="tab-pane active in" id="home">
              <form id="tab">
                  <div class="errMsg commonMsg"></div>
                  <div class="errMsg errMsgUid"></div>
                  <label for="uid">*学号</label>
                  <input type="text" placeholder="学号" class="input-xlarge" id="uid">

                  <div class="errMsg errMsgPwd"></div>
                  <label for="pwd">*密码</label>
                  <input type="password" placeholder="密码" class="input-xlarge" id="pwd">

                  <div class="errMsg errMsgName"></div>
                  <label for="name">*姓名</label>
                  <input type="text" placeholder="姓名" class="input-xlarge" id="name">

                  <label for="sex">性别</label>
                  <select id="sex">
                      <?php foreach($sex as $k=>$v){ ?>
                      <option value="<?php echo $k?>"><?php echo $v?></option>
                      <?php }?>
                  </select>
      
                  <label for="major_id">*专业</label>
                  <?php if(!empty($allMajor)){?>
                  <select id="major_id">
                  <?php foreach ($allMajor as $major_id => $value) { ?>  
                      <option value="<?php echo $major_id;?>" >
                        <?php echo $value['majorname'] ?>
                      </option>
                  <?php } ?>
                  </select><br>
                  <?php }else{ ?>
                  <div>暂无可选专业</div>
                  <?php }?>

                  <label for="class_id">*班级</label>
                  <?php if(!empty($allClass)){?>
                  <select id="class_id">
                  <?php foreach ($allClass as $class_id => $value) { ?>  
                      <option value="<?php echo $class_id;?>">
                        <?php echo $value['classname'] ?>
                      </option>
                  <?php } ?>
                  </select>
                  <?php }else{?>
                  <div>暂无可选班级</div>
                  <?php }?>

                  <label for="phone">电话</label>
                  <input type="text" placeholder="电话" class="input-xlarge" id="phone">
              </form>
            </div>
        </div>
        <div class="btn-toolbar">
            <button class="btn btn-primary" id="submit"><i class="icon-save"></i>保存</button>
            <div class="btn-group"></div>
        </div>
    </div>
</div>


<?php include PATH_TPL."/tpl_sidebar.html" ?>